#pragma once
#include "DataTypes.h"

// Forward declaration
class VisualizationExporter;

namespace CoreLogic {
    double calculateTotalTime(const Solution& solution, const Graph& graph, const CodeMap& code_map);
    
    std::pair<Solution, Graph> performAllocation(
        const std::vector<int>& initial_schedule, 
        const Graph& graph, 
        const CodeMap& code_map, 
        const Caps& caps, 
        const Params& params,
        VisualizationExporter* viz_exporter = nullptr);

    bool validateSolution(const Solution& solution, const Graph& graph, const CodeMap& code_map, const Caps& caps);

    std::pair<double, double> evaluateSchedule(
        const std::vector<int>& schedule, 
        const Graph& graph, 
        const CodeMap& code_map, 
        const Caps& caps, 
        const Params& params,
        const std::optional<std::pair<double, double>>& initial_scores,
        VisualizationExporter* viz_exporter = nullptr);
}